<template>
  <div class="basket">
      <div class="toDay">{{time}}</div>
      <vLoading v-if="!static"></vLoading>
      <vItem  v-if="static" :date=this.list></vItem>
  </div>
</template>

<script>
import {Get,Post,Put,Del} from '@/api/index.js'
import vItem from '@/components/List.vue'
import vLoading from '@/components/Loading.vue'

export default {
  name: 'basket',
  data () {
    return {
      static:false,
      time: '今日赛程',
      list:[]
    }
  },
  components:{
    vItem,vLoading
  },
  mounted(){
    this.getData()
  },
  methods:{
    async getData(){
        let that=this
        let reg=await Get('/sport/match?_include=home_crop,away_crop,sport_match_set&is_show=2',this.$store.state.token)
        that.static=true
        this.list=reg.data
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
